import { $get, $post, $put, $del } from '@/utils/request'
export async function request({ url, method, params, data }) {
  let result
  if (method == 'get') {
    result = await $get(url, params)
  } else if (method == 'post') {
    result = await $post(url, data)
  } else if (method == 'put') {
    result = await $put(url, data)
  } else if (method == 'delete') {
    result = await $del(url, data)
  }
  return result
}
